package com.dingup.provider.feign.server.sys;

import com.dingup.provider.service.sys.SysPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by wancheng on 2018/7/30.
 */
@RestController()
@RequestMapping("/sys/permission")
public class PermissionFeign {

    @Autowired
    SysPermissionService sysPermissionService;

    @RequestMapping(value = "/get_user_if_has_permission/{userId}")
    public List<String>  getIfHasPermissionByUserId(@PathVariable("userId") String userId){
        return sysPermissionService.getPermissionByUserId(userId);
    };
}
